luci-base: ui.js: gracefully handle failing confirm calls on rollback
authorJo-Philipp Wich <[email protected]>
Thu, 5 May 2022 21:31:21 +0000 (23:31 +0200)
committerJo-Philipp Wich <[email protected]>
Fri, 6 May 2022 11:42:54 +0000 (13:42 +0200)
Do not abort the poll loop if some confirm request attempts fail, which
might happen when the device starts rolling back its configuration.

Before that fix, the rollback information dialog offering an unchecked
apply was not reliably presented in such situations.

Signed-off-by: Jo-Philipp Wich <[email protected]>
modules/luci-base/htdocs/luci-static/resources/ui.js

index b8763ef160537a9e33b197a7e4ce186517f0f2c9..52f155b90e89f606c2ce2b61dc26d268765bc10e 100644 (file)
@@ -4508,7 +4508,7 @@ var UI = baseclass.extend(/** @lends LuCI.ui.prototype */ {
                                                        method: 'post',
                                                        timeout: L.env.apply_timeout * 1000,
                                                        query: { sid: L.env.sessionid, token: L.env.token }
-                                               }).then(call);
+                                               }).then(call, call.bind(null, { status: 0 }, null, 0));
                                        }, delay);
                                };